﻿using System;

namespace ConsoleApp1
{
    class Program
    {
        static void swap(ref int a, ref int b)
        {
            int c = a;
            a = b;
            b = c;
        }

        public delegate void MethodDelegate(ref int a, ref int b);

        static void Main(string[] args)
        {
            int a = 1;
            int b = 2;
            //swap(ref a, ref b);
            MethodDelegate action = swap;
            action.Invoke(ref a,ref b);

            Console.WriteLine(a + "," + b);

            //DelegateTest dt = new DelegateTest();
            //dt.Test();

            //Coder c = new Coder();
            //Tester t = new Tester();
            //Designer d = new Designer();

            //Monitor m = new Monitor();
            //m.Notify += c.DoWork;
            //m.Notify += t.DoWork;

            ////Boss来了
            //m.Broadcast();

            //DelegateTest dt = new DelegateTest();
            //dt.Test();

            //LambdaTest lt = new LambdaTest();
            //lt.Test();

            //MemberTest mt = new MemberTest();
            //mt.Test();

        }
    }
}
